﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using OpenSoftStore.BusinessLogic.Bill;
using OpenSoftStore.BusinessLogic.Member;
using OpenSoftStore.Client.Common;

namespace OpenSoftStore.Client.UIL.ManageReport
{
    public partial class ReportDinnerTimes : UserControl
    {

        private DinnerSaleLogic LgcDinnerSale;
        private static ReportDinnerTimes instance;
        public static ReportDinnerTimes Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new ReportDinnerTimes();
                }
                return instance;
            }
        }
        public ReportDinnerTimes()
        {
            LgcDinnerSale = new DinnerSaleLogic();
            InitializeComponent();
   
            this.Dock = DockStyle.Fill;
            btnSearch_Click(null,null);
            SPACommon.SetDataGridStyle(dgvBill);
            SPACommon.ShowSummary(dgvBill);
        }

        private void btnSearch_Click(object sender, EventArgs e)
        {
 
            string whereStr = string.Format("");
            dgvBill.AutoGenerateColumns = false;
            dgvBill.DataSource = LgcDinnerSale.GetDinnerSaleTimesReport(whereStr);
        }

        private void btnOutput_Click(object sender, EventArgs e)
        {
            SPACommon.ExportToExcel(dgvBill, "套餐剩余计次项统计");
        }
    }
}
